<template>
	<view :style="styles">
		<slot></slot>
	</view>
</template>

<script lang="ts" setup>
	import { computed } from 'vue';

	const props = defineProps<{ size ?: string | number, bold ?: boolean, color ?: string, align ?: string, customStyle ?: any }>()

	const styles = computed(() => {
		return {
			...(props.size ? { fontSize: typeof props.size === 'number' ? props.size + "rpx" : props.size } : {}),
			...(props.bold ? { fontWeight: "bold" } : {}),
			...(props.color ? { color: props.color } : {}),
			...(props.align ? { textAlign: props.align } : {}),
			...props.customStyle
		}
	})
</script>

<style>
</style>